package com.gitee.qdbp.base.system.service;

import com.gitee.qdbp.tools.codec.DigestTools;

/**
 * 密码服务实现类
 *
 * @author zhaohuihua
 * @version 151010
 */
// @Service
public class PasswordService implements IPasswordService {

    @Override
    public String create(String id, String password) {
        return DigestTools.md5(password);
    }

    @Override
    public boolean validate(String id, String password, String hashPassword) {
        return create(id, password).equalsIgnoreCase(hashPassword);
    }
}
